using System;
using System.Runtime.InteropServices;

namespace Struct
{
	/// <summary>
	/// Structure defining a CD table of contents. This structure is returned as a tag from 
	/// FSOUND_Stream_FindTagField when the tag name "CD_TOC" is specified.
	/// Note: All tracks on the CD - including data tracks- will be represented in 
	/// this structure so it's use for anything other than generating disc id information 
	/// is not recommended. See the cdda example program for info on retrieving and using this structure.
	/// </summary>
	public struct FSOUND_TOC_TAG
	{
		/// <summary>
		/// The string "TOC", just in case this structure is accidentally treated as a string
		/// </summary>
		public char[] name;

		/// <summary>
		/// The number of tracks on the CD
		/// </summary>
		public int numtracks;

		/// <summary>
		/// The start offset of each track in minutes
		/// </summary>
		public int[] min;

		/// <summary>
		/// The start offset of each track in seconds
		/// </summary>
		public int[] sec;

		/// <summary>
		/// The start offset of each track in frames
		/// </summary>
		public int[] frame;
	}



	/// <summary>
	/// Structure defining the properties for a reverb source, related to a FSOUND channel.
	/// For more indepth descriptions of the reverb properties under win32, please see the EAX3
	/// documentation at http://developer.creative.com/ under the 'downloads' section.
	/// If they do not have the EAX3 documentation, then most information can be attained from
	/// the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of 
	/// EAX2. Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
	/// Note that integer values that typically range from -10,000 to 1000 are represented in 
	/// decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
	/// PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). 
	/// Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
	/// the reverb should product a similar effect on either platform.
	/// Linux and FMODCE do not support the reverb api.
	/// The numerical values listed below are the maximum, minimum and default values for each variable respectively.
	/// </summary>
	public struct FSOUND_REVERB_CHANNELPROPERTIES
	{
		/// <summary>
		/// 0 , 25 , 0 , sets all listener properties (WIN32/PS2 only) 
		/// </summary>
		public uint Environment;

		/// <summary>
		/// 1.0 , 100.0 , 7.5 , environment size in meters (WIN32 only) 
		/// </summary>
		public float EnvSize;

		/// <summary>
		/// 0.0 , 1.0 , 1.0 , environment diffusion (WIN32/XBOX) 
		/// </summary>
		public float EnvDiffusion;

		/// <summary>
		/// -10000, 0 , -1000 , room effect level (at mid frequencies) (WIN32/XBOX/PS2) 
		/// </summary>
		public int Room;

		/// <summary>
		/// -10000, 0 , -100 , relative room effect level at high frequencies (WIN32/XBOX) 
		/// </summary>
		public int RoomHF;

		/// <summary>
		/// -10000, 0 , 0 , relative room effect level at low frequencies (WIN32 only) 
		/// </summary>
		public int RoomLF;

		/// <summary>
		/// 0.1 , 20.0 , 1.49 , reverberation decay time at mid frequencies (WIN32/XBOX) 
		/// </summary>
		public float DecayTime;

		/// <summary>
		/// 0.1 , 2.0 , 0.83 , high-frequency to mid-frequency decay time ratio (WIN32/XBOX) 
		/// </summary>
		public float DecayHFRatio;

		/// <summary>
		/// 0.1 , 2.0 , 1.0 , low-frequency to mid-frequency decay time ratio (WIN32 only) 
		/// </summary>
		public float DecayLFRatio;

		/// <summary>
		/// -10000, 1000 , -2602 , early reflections level relative to room effect (WIN32/XBOX) 
		/// </summary>
		public int Reflections;

		/// <summary>
		/// 0.0 , 0.3 , 0.007 , initial reflection delay time (WIN32/XBOX) 
		/// </summary>
		public float ReflectionsDelay;

		/// <summary>
		/// , , [0,0,0], early reflections panning vector (WIN32 only) 
		/// </summary>
		public float ReflectionsPan_3;

		/// <summary>
		/// -10000, 2000 , 200 , late reverberation level relative to room effect (WIN32/XBOX) 
		/// </summary>
		public int Reverb;

		/// <summary>
		/// 0.0 , 0.1 , 0.011 , late reverberation delay time relative to initial reflection (WIN32/XBOX) 
		/// </summary>
		public float ReverbDelay;

		/// <summary>
		/// , , [0,0,0], late reverberation panning vector (WIN32 only) 
		/// </summary>
		public float ReverbPan_3;

		/// <summary>
		/// .075 , 0.25 , 0.25 , echo time (WIN32/PS2 only. PS2 = Delay time for ECHO/DELAY modes only) 
		/// </summary>
		public float EchoTime;

		/// <summary>
		/// 0.0 , 1.0 , 0.0 , echo depth (WIN32/PS2 only. PS2 = Feedback level for ECHO mode only) 
		/// </summary>
		public float EchoDepth;

		/// <summary>
		/// 0.04 , 4.0 , 0.25 , modulation time (WIN32 only) 
		/// </summary>
		public float ModulationTime;

		/// <summary>
		/// 0.0 , 1.0 , 0.0 , modulation depth (WIN32 only) 
		/// </summary>
		public float ModulationDepth;

		/// <summary>
		/// -100 , 0.0 , -5.0 , change in level per meter at high frequencies (WIN32 only) 
		/// </summary>
		public float AirAbsorptionHF;

		/// <summary>
		/// 1000.0, 20000 , 5000.0 , reference high frequency (hz) (WIN32/XBOX) 
		/// </summary>
		public float HFReference;

		/// <summary>
		/// 20.0 , 1000.0, 250.0 , reference low frequency (hz) (WIN32 only) 
		/// </summary>
		public float LFReference;

		/// <summary>
		/// 0.0 , 10.0 , 0.0 , like FSOUND_3D_SetRolloffFactor but for room effect (WIN32/XBOX) 
		/// </summary>
		public float RoomRolloffFactor;

		/// <summary>
		/// 0.0 , 100.0 , 100.0 , Value that controls the echo density in the late reverberation decay. (XBOX only) 
		/// </summary>
		public float Diffusion;

		/// <summary>
		/// 0.0 , 100.0 , 100.0 , Value that controls the modal density in the late reverberation decay (XBOX only) 
		/// </summary>
		public float Density;

		/// <summary>
		/// FSOUND_REVERB_FLAGS - modifies the behavior of above properties (WIN32/PS2 only) 
		/// </summary>
		public uint Flags;
	}



	/// <summary>
	/// Structure defining a reverb environment.
	/// For more indepth descriptions of the reverb properties under win32, 
	/// please see the EAX2 and EAX3 documentation at http://developer.creative.com/ 
	/// under the 'downloads' section. If they do not have the EAX3 documentation, 
	/// then most information can be attained from the EAX2 documentation, as EAX3 only 
	/// adds some more parameters and functionality on top of EAX2. Note the default 
	/// reverb properties are the same as the FSOUND_PRESET_GENERIC preset. Note that integer 
	/// values that typically range from -10,000 to 1000 are represented in decibels, and 
	/// are of a logarithmic scale, not linear, wheras float values are typically linear. 
	/// PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). 
	/// Some reverb parameters are only supported in win32 and some only on xbox. 
	/// If all parameters are set then the reverb should product a similar effect on either platform.
	/// The numerical values listed below are the maximum, minimum and default values for 
	/// each variable respectively.
	/// </summary>
	public struct FSOUND_REVERB_PROPERTIES
	{
		/// <summary>
		/// -10000, 1000, 0, direct path level (at low and mid frequencies) (WIN32/XBOX) 
		/// </summary>
		public int Direct;
		 
		/// <summary>
		/// -10000, 0, 0, relative direct path level at high frequencies (WIN32/XBOX) 
		/// </summary>
		public int DirectHF;

		/// <summary>
		/// -10000, 1000, 0, room effect level (at low and mid frequencies) (WIN32/XBOX/PS2) 
		/// </summary>
		public int Room;

		/// <summary>
		/// -10000, 0, 0, relative room effect level at high frequencies (WIN32/XBOX) 
		/// </summary>
		public int RoomHF;

		/// <summary>
		/// -10000, 0, 0, main obstruction control (attenuation at high frequencies) (WIN32/XBOX) 
		/// </summary>
		public int Obstruction;

		/// <summary>
		/// 0.0, 1.0, 0.0, obstruction low-frequency level re. main control (WIN32/XBOX) 
		/// </summary>
		public float ObstructionLFRatio;

		/// <summary>
		/// -10000, 0, 0, main occlusion control (attenuation at high frequencies) (WIN32/XBOX) 
		/// </summary>
		public int Occlusion;

		/// <summary>
		/// 0.0, 1.0, 0.25, occlusion low-frequency level re. main control (WIN32/XBOX) 
		/// </summary>
		public float OcclusionLFRatio;

		/// <summary>
		/// 0.0, 10.0, 1.5, relative occlusion control for room effect (WIN32) 
		/// </summary>
		public float OcclusionRoomRatio;

		/// <summary>
		/// 0.0, 10.0, 1.0, relative occlusion control for direct path (WIN32) 
		/// </summary>
		public float OcclusionDirectRatio;

		/// <summary>
		/// -10000, 0, 0, main exlusion control (attenuation at high frequencies) (WIN32) 
		/// </summary>
		public int Exclusion;

		/// <summary>
		/// 0.0, 1.0, 1.0, exclusion low-frequency level re. main control (WIN32) 
		/// </summary>
		public float ExclusionLFRatio;

		/// <summary>
		/// -10000, 0, 0, outside sound cone level at high frequencies (WIN32) 
		/// </summary>
		public int OutsideVolumeHF;

		/// <summary>
		/// 0.0, 10.0, 0.0, like DS3D flDopplerFactor but per source (WIN32) 
		/// </summary>
		public float DopplerFactor;

		/// <summary>
		/// 0.0, 10.0, 0.0, like DS3D flRolloffFactor but per source (WIN32) 
		/// </summary>
		public float RolloffFactor;

		/// <summary>
		/// 0.0, 10.0, 0.0, like DS3D flRolloffFactor but for room effect (WIN32/XBOX) 
		/// </summary>
		public float RoomRolloffFactor;

		/// <summary>
		/// 0.0, 10.0, 1.0, multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (WIN32) 
		/// </summary>
		public float AirAbsorptionFactor;

		/// <summary>
		/// FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (WIN32) 
		/// </summary>
		public int Flags;
	}
}
